package com.dankegongyu.demo.http.http.api;

import com.dankegongyu.demo.http.bean.DeviceRegisterRsp;
import com.dankegongyu.demo.http.http.DKObserver;
import com.dankegongyu.lib.http.DKHttp;

import io.reactivex.schedulers.Schedulers;

/**
 * @author wupuquan
 * @version 1.0
 * @since 2018/7/4 19:42
 */
public class ApiHelper {

    /**
     * 按蛋壳Api，分页从1开始
     */
    public static final int PAGE_START = 1;

    /**
     * 分页每页条数
     */
    public static final int PER_PAGE = 15;

    /**
     * 注册设备
     */
    public static void registerDevice() {
        DKHttp.get(Api.DEVICE_REGISTER)
                .execute(DeviceRegisterRsp.class)
                .subscribeOn(Schedulers.io())
                .subscribe(new DKObserver<DeviceRegisterRsp>() {
                    @Override
                    public void onNext(DeviceRegisterRsp deviceRegisterRsp) {

                    }
                });
    }
}
